#ifndef NUDUS_H
#define NUDUS_H

// Nudus-Script
//
// Copyright (C) 2012  Damian Balandowski
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#include <iostream>
#include <vector>
#include <fstream>
#include <string>

using namespace std;

bool isString = false;

string loadFile(char *f)
{
	string tmp = "";
	string buf = "";
	fstream file(f);
	while(!file.eof())
	{
		file >> tmp;
    if(tmp == "'" && !isString) { isString = true; }
    if(tmp == "'" && isString) { isString = false; }
    if(isString) buf += tmp; buf += ' ';
    else buf += tmp;
		tmp = "";
	}
	file.close();
	return buf;
}

struct variable // variable and array
{
	string name;
	// string value;
   vector<string>values;
};

struct function
{
	string name;
	vector<string>args;
};

struct function_nudus {
  string name;
  string content;
};

#endif